<?php

require_once("../../globals.php");
require_once("$srcdir/patient.inc");
require_once("$srcdir/formdata.inc.php");
require_once("$srcdir/formatting.inc.php");
require_once("$srcdir/jsonwrapper/jsonwrapper.php");



		$user = $_SESSION['authUserID'];
		$query = "SELECT * FROM users WHERE id = $user";
		echo $query;
		$res = sqlStatement($query);
		$row = sqlFetchArray($res);
		$username = $row['username'];
		
		$query = "UPDATE pnotes SET message_status = 'Leido' WHERE assigned_to = '$username' AND message_status = 'nuevo' AND deleted=0";
		echo $query;
		sqlStatement($query);
		


?>